package s15.e03.callexmethods;

public class Main {

	public static void main(String[] args) {
		try {
			start();

		} catch (Exception e) {
			System.out.println("Message: " + e.getMessage());
			System.out.println("Stacktrace");
			e.printStackTrace();
		} finally {
			System.out.println("Finally");
		}
		System.out.println("End");
	}

	private static void start() {
		Double[] doubles = { 2d, 3d };
		try {
			getElement(doubles, 4);
		} catch (ArithmeticException e) {
			System.out.println("Here");
		}

		System.out.println("Will not be displayed");
	}

	private static Object getElement(Object[] objects, int index) {
		return objects[index];

	}

}
